In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a virtual machine monitor (VMM) manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a remote client. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems. The VMM virtualizes the underlying hardware of the host machine or emulates hardware devices, making the use of the VM transparent to the guest operating system or the remote client that uses the VM.
In some virtualization systems, the host is a centralized server that is partitioned into multiple VMs to provide virtual desktops to users within an enterprise. A problem with centralized hosting of VMs is the use of shared storage amongst the VMs. Typically, each VM is allocated some minimum storage space out of the shared pool of storage. Because the total amount of storage in a shared pool of storage is a fixed amount, conserving disk space becomes an important consideration in virtualization systems. The storage allocation per VM is usually a sparse amount that is allocated on-demand; rather than allocating to each VM the maximum amount of storage that the VM may use. Virtualization systems require storage allocation in this sparse manner in order to conserve disk space for use only by VM systems that require the storage.
One exemplary use of the shared storage for VMs is to store an image template of a VM, so as to reduce or eliminate the need to install an OS and applications in every copy of a VM on a host machine and to reduce disk image size. This image template may include a codebase of an operating system (a guest operating system) and applications running on the guest operating system, as well as libraries and data used by the guest operating system and the applications. The size of a typical VM image is substantial. For example, an enterprise's virtual machine image is usually more than 10 GB. Hence, in an enterprise with 1,000 users, the storage requirement for virtual machine images is likely to exceed 10 TB. Maintaining such a large amount of storage is expensive and inefficient.
Most virtualization systems include one or more clusters of host machines that each run multiple VMs. Upon initialization of a new VM, a host machine must be selected to host this VM. Many factors may be considered in the initial placement of this VM, including, but not limited to, CPU usage, power consumption considerations, and so on. A mechanism for optimizing the initial placement of a VM to consider reduction of memory consumption as part of the multiple factors of initial placement would be beneficial.